<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
    <title>Hello World!</title>

</head>
<body>
<h1>Hello ${name} from resource freemark!</h1>
<h4>表格：</h4>
       <#list list1 as item>
               姓名：${item.name} , 年龄${item.age}
           <br>
       </#list>

<h4>树列表：</h4>
<ul>
    <!-- 递归  宏定义 -->
      <#macro bpTree children>
          <#if children?? && children?size gt 0>
              <#list children as child>
                  <#if child.children?? && child.children?size gt 0>
        <li class="treeview">
            <a href="javascript:void(0)">
                <i class="${(child.mIcon=='')?string('fa fa-share',child.mIcon) }" aria-hidden="true"></i> <span>${child.mCname}</span>
                <i class="fa fa-angle-left pull-right" aria-hidden="true"></i>
            </a>
            <ul class="treeview-menu">
            <@bpTree children=child.children />
            </ul>
        </li>
                  <#else>
            <li><a href="javascript:void(0)" onclick="loadContent('${child.mUrl}')"><i class="${(child.mIcon=='')?string('fa fa-circle-o',child.mIcon) }" aria-hidden="true"></i> ${child.mCname}</a></li>
                  </#if>
              </#list>
          </#if>
      </#macro>
    <!-- 调用宏 生成递归树 -->
       <@bpTree children=dto />
</ul>
<h4>select选择框</h4>
<#macro bpSelect  datas>
     <select>
         <option>---请选择---</option>
          <#list datas as data>
              <option value="${data.id}">${data.name}</option>
          </#list>
     </select>
</#macro>
<@bpSelect  datas=selectList/>
</body>
</html>